<%@page import="com.google.appengine.api.images.ImagesServiceFactory"%>
<%@page import="com.google.appengine.api.images.Image"%>
<%@page import="cn.edu.hust.sse.software7.class3.entities.EBProduct"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<html>
<head>
<title>Insert title here</title>
<%
	List<EBProduct> prods = (List<EBProduct>) session
			.getAttribute("prodList");
%>
</head>
<body>
<div style="background-color: activeborder;">
<%
	if (null == prods || prods.isEmpty()) {
%>
!没有商品，请先
<a href="">添加</a>
商品!
<%
	} else {
%>
<table style="background-color: silver; width: 100%; ">
	<tr style="background-color: gray;">
		<td><b>商品ID</b></td>
		<td><b>商品名称</b></td>
		<td><b>商品种类</b></td>
		<td><b>商品图片</b></td>
		<td><b>商品价格</b></td>
		<td><b>运费</b></td>
		<td><b>一口成交价</b></td>
		<td><b>商品数量</b></td>
		<td><b>商品描述</b></td>
		<td></td>
	</tr>
	<%
		for (EBProduct prod : prods) {			
	%>
	<tr style="background-color: activeborder; width: 100%; border: medium;">
		<td><%=prod.getProductId()%></td>
		<td><%=prod.getProductName()%></td>
		<td><%=prod.getMyCategoryId()%></td>
		<td><img src="/image?type=1&id=<%=prod.getProductId()%>"></td>
		<td><%=prod.getLowestPrice()%></td>
		<td><%=prod.getTradingPrice()%></td>
		<td><%=prod.getFreight()%></td>
		<td><%=prod.getMount()%></td>
		<td><%=prod.getProductDescription()%></td>
		<td><a
			href="/goto?page=watchProdDetail&prod2Watch=<%=prod.getProductId()%>">查看</a><br />
		<a
			href="/goto?page=updateProd&prod2Update=<%=prod.getProductId()%>">修改</a><br />
		<a
			href="/product?method=delete&prod2Delete=<%=prod.getProductId()%>">删除</a>
		</td>
	</tr>
	<%
		}
	%>
</table>
<%
	}
%>
</div>
</body>
</html>